package bancosys.tec.persist.entities.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import jmine.tec.persist.annotation.Alias;
import bancosys.tec.persist.bussobj.PersistableBusinessObject;

@Entity
@Alias("EWNQ")
@NamedQueries(value = { @NamedQuery(name = "withName", query = "from EntityWithNamedQueries where name = ? "),
        @NamedQuery(name = "updateName", query = "update EntityWithNamedQueries set name = ? where name = ?"),
        @NamedQuery(name = "deleteWithName", query = "delete from EntityWithNamedQueries where name = ?") })
public class EntityWithNamedQueries extends PersistableBusinessObject {

    private Long id;

    private String name;

    /**
     * @return the id
     */
    @Id
    @GeneratedValue
    public Long getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return this.name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

}
